﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Linq.Expressions;

namespace IRC.IRepairClouds.DataLayer.Expressions
{
    public sealed class LambdaExpressionBuilder<T> : ExpressionBuilder<T>
    {
        public LambdaExpression SpecificExpression
        {
            get { return (LambdaExpression)Expression; }
        }

        internal LambdaExpressionBuilder(LambdaExpression expression)
            : base(expression)
        {
        }

        public static implicit operator LambdaExpression(LambdaExpressionBuilder<T> expressionBuilder)
        {
            return expressionBuilder.SpecificExpression;
        }

        public static implicit operator LambdaExpressionBuilder<T>(LambdaExpression expression)
        {
            return new LambdaExpressionBuilder<T>(expression);
        }
    }
}
